package com.youku.plugins.endcardV4New
{
   import com.youku.interfaces.IPlugin;
   import com.youku.plugins.endcardV4New.view.EndCardMediator;
   import com.youku.plugins.endcardV4New.model.RelativeVideoListProxy;
   import com.youku.plugins.PluginEventDispather;
   import flash.display.MovieClip;
   import com.youku.interfaces.IPlayerProxy;
   import flash.net.registerClassAlias;
   
   public class EndCardFacade extends Object implements IPlugin
   {
      
      public function EndCardFacade() {
         super();
      }
      
      private static var _instance:EndCardFacade;
      
      public static function getInstance() : EndCardFacade {
         if(_instance == null)
         {
            _instance = new EndCardFacade();
         }
         return _instance as EndCardFacade;
      }
      
      private var _mediator:EndCardMediator;
      
      private var _dataProxy:RelativeVideoListProxy;
      
      private var _eventDispather:PluginEventDispather;
      
      public function init(param1:MovieClip, param2:IPlayerProxy) : void {
         this.registerSkin();
         EndCardFont.setEndCardFont();
         this._eventDispather = PluginEventDispather.getInstance();
         this._dataProxy = new RelativeVideoListProxy(this._eventDispather);
         this._mediator = new EndCardMediator(param1,param2,this._eventDispather,this._dataProxy);
      }
      
      private function registerSkin() : void {
         registerClassAlias("EndCard_navigate_button_right_up",E_navigate_button_right_up);
         registerClassAlias("EndCard_navigate_button_right_over",E_navigate_button_right_over);
         registerClassAlias("EndCard_navigate_button_right_down",E_navigate_button_right_down);
         registerClassAlias("EndCard_navigate_button_right_disable",E_navigate_button_right_disable);
         registerClassAlias("EndCard_navigate_button_left_up",E_navigate_button_left_up);
         registerClassAlias("EndCard_navigate_button_left_over",E_navigate_button_left_over);
         registerClassAlias("EndCard_navigate_button_left_down",E_navigate_button_left_down);
         registerClassAlias("EndCard_navigate_button_left_disable",E_navigate_button_left_disable);
         registerClassAlias("EndCard_replay_button_up",E_rplay_up);
         registerClassAlias("EndCard_replay_button_over",E_rplay_over);
         registerClassAlias("EndCard_replay_button_down",E_rplay_down);
         registerClassAlias("EndCard_replay_button_disable",E_rplay_up);
         registerClassAlias("EndCard_share_button_up",E_share_up);
         registerClassAlias("EndCard_share_button_over",E_share_over);
         registerClassAlias("EndCard_share_button_down",E_share_down);
         registerClassAlias("EndCard_share_button_disable",E_share_disable);
         registerClassAlias("EndCard_fullScreen_on_up",E_full_up);
         registerClassAlias("EndCard_fullScreen_on_over",E_full_over);
         registerClassAlias("EndCard_fullScreen_on_down",E_full_down);
         registerClassAlias("EndCard_fullScreen_on_disable",E_full_up);
         registerClassAlias("EndCard_fullScreen_off_up",E_exit_up);
         registerClassAlias("EndCard_fullScreen_off_over",E_exit_over);
         registerClassAlias("EndCard_fullScreen_off_down",E_exit_down);
         registerClassAlias("EndCard_fullScreen_off_disable",E_exit_up);
         registerClassAlias("EndCard_favorite_button_up",E_fav_up);
         registerClassAlias("EndCard_favorite_button_over",E_fav_over);
         registerClassAlias("EndCard_favorite_button_down",E_fav_down);
         registerClassAlias("EndCard_favorite_button_disable",E_fav_disable);
         registerClassAlias("EndCard_up_button_up",E_up_up);
         registerClassAlias("EndCard_up_button_over",E_up_over);
         registerClassAlias("EndCard_up_button_down",E_up_down);
         registerClassAlias("EndCard_up_button_disable",E_up_disable);
         registerClassAlias("E_play_counts_icon",E_play_counts_icon);
         registerClassAlias("E_comment_icon",E_comment_icon);
         registerClassAlias("E_Error_Icon",E_Error_Icon);
      }
   }
}
